<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
<title>135编辑器图文预览</title>
<meta NAME="ROBOTS" CONTENT="INDEX,FOLLOW">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
body{padding:10px;max-width:360px;margin:0 auto;}
*{margin:0;}
.appmsg{border:1px solid #e7e7eb;margin:10px 0;padding: 10px;}
.appmsg h4{height:44px;margin:10px 0px;overflow:hidden;}
.appmsg_content{padding: 0 14px;position: relative;}
.appmsg_content .cover{height: 120px;overflow: hidden;}
.appmsg_content img{width:100%;}


.title,.submsg-title{padding: 0px 14px;line-height:40px;font-size:14px;}
.submsg-title {border-top:1px solid #ccc;}

.appmsg_desc {
	max-height:80px;overflow:hidden;
	padding: 5px 0 10px;
	word-wrap: break-word;
	word-break: break-all;
}
</style>
</head>
  {{if !$is_mobile}}
  <script src="//static.135editor.com/js/qrcode.js"></script>
  <script src="https://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
  {{/if}}
<body>
<div class="container">
    <div class=" ui-portlet" id="wxmsg-mine-list">
	   <div id="wxmsg-preview">
		   <div class="appmsg article-msg clearfix">
	{{loop $media_info['news_item'] $ak $article}}
				<div  id="article-msg-{{$ak}}"  data-id="{{$ak}}" class="{{if $ak==0}}title{{else}}submsg-title{{/if}}">
					<p><a href="{{$article['url']}}" target="_blank">{{$article['title']}}</a></p>
					<p id="qr-{{$ak}}" style="text-align: center;display:none;"></p>
					<!-- {{$this->Html->image('/wx_msgs/wechat_thumb?tmid='.$article['thumb_media_id'],array('class'=>'cover'))}} -->
				</div>
	{{/loop}}
		   </div>
    	</div>
    	<div class="alert alert-info" style="color:#999;">
			<p><small>点击文章标题，进入微信文章页预览效果.<br/>完整标题，封面图片此处不显示。</small></p>
		</div>
    </div>
</div>
{{if !$is_mobile}}
<script>
	$(function(){
	    $('.appmsg').find('a').each(function(i){
            var url = $(this).attr('href');
            //参数1表示图像大小，取值范围1-10；参数2表示质量，取值范围'L','M','Q','H'
            var qr = qrcode(10, 'M');
            qr.addData(url);
            qr.make();

            $('#qr-'+i).append(qr.createImgTag()).show();
		});
	})
</script>
{{/if}}
</body>
</html>
